package ia04.agent.weather;

import jade.core.AID;
import jade.core.Agent;
import java.util.ArrayList;

/* Possible weather strings
 * Soleil
 * Couvert
 * Pluie
 * Orage
 * Neige
 */

public class AgentWeather extends Agent {
	
	private String weather = "Soleil";
	private ArrayList<AID> subscribedAgents;
	
	public AgentWeather()
	{
		subscribedAgents = new ArrayList<AID>();
	}
	
	protected void setup() {
		try {
			addBehaviour(new BehavUpdateWeather(this));
			addBehaviour(new BehavMessWeather());
		}
		catch(Exception ex) {
		}
	}

	public void setWeather(String weather)
	{
		this.weather = weather;
	}

	public String getWeather()
	{
		return weather;
	}
	
	public void addSubscriber(AID newSubscriber)
	{
		subscribedAgents.add(newSubscriber);
	}
	
	public ArrayList<AID> getSubscribedAgents()
	{
		return subscribedAgents;
	}

}
